import Layout from '../components/layout/Layout'
import Login from '../components/layout/login'
const routers = [{
		path: '/',
		redirect: '/login'
	},
	{
		path: '/login',
		meta: {
			title: '登 录',
			pname: 'login'
		},
		name: 'login',
		component: Login
	},
	{
		path: '/console',
		name: 'console',
		component: Layout,
	    meta: {
	        title: '控制台首页',
	    	hiddenmenu: true,
	    	pname:'console'
	    },
	    children: [
	    	{
	    		path: '/console/index',
	    		name:'console_index',
	    		component: (resolve) => require(['../components/index/index.vue'], resolve),
	    		meta: {
	    			title: '系统首页',
	    			hiddenmenu: true,
	    			pname:'console'
	    		}
	    	}
	    ]
	},
	{
		path: '/setting',
		name: 'setting',
		component: Layout,
	    meta: {
	        title: '系统配置',
	    	hiddenmenu: false,
	    	pname:'setting'
	    },
	    children: [
	    	{
	    		path: '/setting/index',
	    		name:'setting_index',
	    		component: (resolve) => require(['../components/setting/index.vue'], resolve),
	    		meta: {
	    			title: '系统配置',
	    			hiddenmenu: false,
	    			pname:'setting'
	    		}
	    	},
	    	{
	    		path: '/setting/storage',
	    		name:'setting_storage',
	    		component: (resolve) => require(['../components/setting/storage.vue'], resolve),
	    		meta: {
	    			title: '存储设置',
	    			hiddenmenu: false,
	    			pname:'setting'
	    		}
	    	}
	    ]
	},
	{
		path: '/content',
		name: 'content',
		component: Layout,
	    meta: {
	        title: '内容管理',
	    	hiddenmenu: false,
	    	pname:'content'
	    },
	    children: [
	    	{
	    		path: '/content/article',
	    		name:'content_article',
	    		component: (resolve) => require(['../components/content/article.vue'], resolve),
	    		meta: {
	    			title: '文章管理',
	    			hiddenmenu: false,
	    			pname:'content'
	    		}
	    	},
	    	{
	    		path: '/content/tags',
	    		name:'content_tags',
	    		component: (resolve) => require(['../components/content/tags.vue'], resolve),
	    		meta: {
	    			title: '标签管理',
	    			hiddenmenu: false,
	    			pname:'content'
	    		}
	    	},
	    	{
	    		path: '/content/classify',
	    		name:'content_classify',
	    		component: (resolve) => require(['../components/content/classify.vue'], resolve),
	    		meta: {
	    			title: '分类管理',
	    			hiddenmenu: false,
	    			pname:'content'
	    		}
	    	}
	    ]
	},
]
export default routers